<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组方法</title>
</head>
<body>
<!--push 方法向数组追加新元素-->
<button onclick="zj()">增加</button>
<p id="demo"></p>

<script>
  var fruits = ["Banana", "Orange", "Apple", "Mango"];
  document.getElementById("demo").innerHTML = fruits;

  function zj(){
    fruits.push("Lemon");
    document.getElementById("demo").innerHTML = fruits;
  }
</script>
</body>
</html>